import { http } from '@/utils/http'
import type { PatientFile } from '@/types/docter/medical'


/**
 * 添加就诊信息----
 * @param data 请求参数
 */
export const postMemberAddFileAPI = (data: PatientFile) => {
  return http({
    method: 'POST',
    url: '/system/user/addFile',
    data,
  })
}

/**
 * 获取就诊信息列表--
 */
export const getMemberAddFileAPI = () => {
  return http<PatientFile[]>({
    method: 'GET',
    url: '/system/user/patientFile',
  })
}


/**
 * 获取收货地址详情-回显
 * @param id 地址id(路径参数)
 */
export const getMemberAddressByIdAPI = (id: string) => {
  return http<PatientFile>({
    method: 'GET',
    url: `/system/user/patientFile/${id}`,
  })
}

/**
 * 修改收货地址
 * @param id 地址id(路径参数)
 * @param data 表单数据(请求体参数)
 */
export const putMemberAddressByIdAPI = (id: string, data: PatientFile) => {
  return http({
    method: 'PUT',
    url: `/system/user/patientFile/${id}`,
    data,
  })
}

/**
 * 删除收货地址-------
 * @param id 地址id(路径参数)
 */
export const deleteMemberAddressByIdAPI = (id: string) => {
  return http({
    method: 'DELETE',
    url: `/system/user/patientFile/${id}`,
  })
}
